import request from '@/utils/request'

export const loginApi = ({ username, password }) => {
  return request({
    url: '/user/login',
    method: 'post',
    data: {
      username,
      password
    }
  })
}
export const registerApi = ({ username, password }) => {
  return request({
    url: '/user/register',
    method: 'post',
    data: {
      username,
      password
    }
  })
}
export const getUserListApi = () => {
  return request({
    url: '/user/list',
    method: 'get'
  })
}
